package com.ruoyi.huanghefd.mapper;

import java.util.Date;
import java.util.Collection;

import org.apache.ibatis.annotations.Param;

import com.ruoyi.huanghefd.domain.Worksheet;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Entity com.ruoyi.huanghefd.domain.Worksheet
 */
@Mapper
public interface WorksheetMapper extends BaseMapper<Worksheet> {
    /**
     * @param worksheet
     * @return int
     * @Author gnplum
     * @Description //新增工作票
     * @Date 11:03 2023/10/31
     **/
    int insertAll(Worksheet worksheet);

    /**
     * @param wsCode
     * @return int
     * @Author gnplum
     * @Description //删除工作票
     * @Date 15:13 2023/10/31
     **/
    int delByWsId(@Param("wsCode") String wsCode);

    /**
     * @param worksheet
     * @return int
     * @Author gnplum
     * @Description //修改工作票
     * @Date 16:08 2023/10/31
     **/
    int updateByWsId(Worksheet worksheet);

    /**
     * @param wsCode,wsDept
     * @return java.util.List<com.ruoyi.huanghefd.domain.Worksheet>
     * @Author gnplum
     * @Description //查询工作票 分页
     * @Date 11:03 2023/10/31
     **/
    List<Worksheet> queryWorksheetListByPage(@Param("wsCode") String wsCode, @Param("wsDept") String wsDept, @Param("wsState") String wsState, @Param("userId") String userId, @Param("mailType") String mailType, @Param("wsType") String wsType,@Param("startIndex") int startIndex, @Param("pageSize") int pageSize);

    List<Worksheet> queryWorksheetList(@Param("wsCode") String wsCode, @Param("wsDept") String wsDept, @Param("wsState") String wsState, @Param("userId") String userId, @Param("mailType") String mailType);

    /**
     * @return int
     * @Author gnplum
     * @Description //查询工作票数量  分页总数
     * @Date 2:02 2023/12/20
     **/
    int getWorksheetNum(@Param("wsCode") String wsCode, @Param("wsDept") String wsDept, @Param("wsState") String wsState, @Param("userId") String userId, @Param("mailType") String mailType, @Param("wsType") String wsType);

    /**
     * @return int
     * @Author gnplum
     * @Description //获取工作票编号
     * @Date 16:34 2023/11/6
     **/
    int getWsCodeNum(@Param("PJLX") String PJLX);

    /**
     * @param userId
     * @return int
     * @Author gnplum
     * @Description //获取正在执行票数量
     * @Date 23:50 2023/12/19
     **/
    int getExeSheetNum( @Param("userId") String userId);
}